/**   
* @Title: 圆形面积周长计算实现
* @Package:com.sample.shapecalc.impl
* @Description:圆形面积周长计算实现 
* @author lihuizhuo
* @date  
* @version V1.0   
*/
package com.ex.shapecalc;

import com.ex.question.base.ShapeQuestion;

/**
 * @ClassName: CircleQuestionImpl
 * @Description: 圆形面积周长计算实现
 * @author:lihuizhuo
 * @date:2016-08-01
 */
public class CircleQuestion extends ShapeQuestion {

	/**
	 * CircleR:半径，构造时随机产生，1-11.
	 * 
	 * @since Ver 1.1
	 */
	int mCircler;

	public int getmCircler() {
		return mCircler;
	}

	public void setmCircler(int mCircler) {
		this.mCircler = mCircler;
	}
 

	public CircleQuestion() {
		mQuestionTypeName = "园形面积计算";
		this.createQuestion();
	}

	public CircleQuestion(int r) {
		mQuestionTypeName = "园形面积计算";
		this.createQuestion(r);
	}

	public final void CalcArea() {
		mArea = (float)3.14 * mCircler * mCircler;
	}

	public final void CalcPerimeter() {
		mPerimeter = 2 *  (float)3.14 * mCircler;
	}

	public void createQuestion(int r) {
		mCircler = r;
		CalcArea();
		CalcPerimeter();
	}

	public void createQuestion() {
		createQuestion(mRand.getRandom10());
	}
}
